package com.suredy.app.porject.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.suredy.core.service.DictionarySrv;

/**
 * 字典键值
 * 
 * @author VIVID.G
 * @since 2015-10-22
 * @version v0.1
 */
@Service
public class ProjectConstants {

	/* 合同实施单位 */
	public final static String DK_DO_CONTRACT_COMPANY = "do_contract_company";

	/* 合同业务类型 */
	public final static String DK_CONTRACT_BUSINESS_TYPE = "contract_business_type";

	/* 报价方式 */
	public final static String DK_BID_QUOTATION_TYPE = "bid_quotation_type";

	/* 招标类型 */
	public final static String DK_BID_TYPE = "bid_type";

	/* 投标方式 */
	public final static String DK_BID_WAY = "bid_way";

	/* 招标费用支出名目 */
	public final static String DK_BID_PAYOUT_NAME = "bid_payout_name";

	/* 招标费用收入名目 */
	public final static String DK_BID_PAYIN_NAME = "bid_payin_name";

	/* 合同费用支出名目 */
	public final static String DK_CONTRACT_PAYOUT_NAME = "contract_payout_name";

	/* 合同费用收入名目 */
	public final static String DK_CONTRACT_PAYIN_NAME = "contract_payin_name";

	/* 结算方式 */
	public final static String DK_CONTRACT_JIESUAN_WAY = "contract_jiesuan_way";

	/* 合同起获类型 */
	public final static String DK_CONTRACT_OBTAIN_TYPE = "contract_obtain_type";

	@Autowired
	private DictionarySrv dictionarySrv;

	public List<String> getDoContractCompany(Boolean system) {
		return this.getValues(DK_DO_CONTRACT_COMPANY, system);
	}

	public List<String> getContractBusinessType(Boolean system) {
		return this.getValues(DK_CONTRACT_BUSINESS_TYPE, system);
	}

	public List<String> getBidQuotationType(Boolean system) {
		return this.getValues(DK_BID_QUOTATION_TYPE, system);
	}

	public List<String> getBidTypes(Boolean system) {
		return this.getValues(DK_BID_TYPE, system);
	}

	public List<String> getBidWays(Boolean system) {
		return this.getValues(DK_BID_WAY, system);
	}

	public List<String> getBidPayoutNames(Boolean system) {
		return this.getValues(DK_BID_PAYOUT_NAME, system);
	}

	public List<String> getBidPayinNames(Boolean system) {
		return this.getValues(DK_BID_PAYIN_NAME, system);
	}

	public List<String> getContractPayoutNames(Boolean system) {
		return this.getValues(DK_CONTRACT_PAYOUT_NAME, system);
	}

	public List<String> getContractPayinNames(Boolean system) {
		return this.getValues(DK_CONTRACT_PAYIN_NAME, system);
	}

	public List<String> getContractJiesuanWay(Boolean system) {
		return this.getValues(DK_CONTRACT_JIESUAN_WAY, system);
	}

	public List<String> getContractObtainType(Boolean system) {
		return this.getValues(DK_CONTRACT_OBTAIN_TYPE, system);
	}

	private List<String> getValues(String key, Boolean system) {
		List<String> data = this.dictionarySrv.getVals(key, system);

		return data;
	}

}
